<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SkyGameEngine2d: C:/code/SkyGameEngine2d/src/base/GameWorld.h 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="shpe.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">SkyGameEngine2d
   &#160;<span id="projectnumber">1.0.3</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_0af1587c8378955de40f48b4bd1869f0.html">base</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">GameWorld.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment">    Copyright (C) 2019 Zongming Liu &lt;1849059316@qq.com&gt;</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment">    This program is free software; you can redistribute it and/or modify</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment">    it under the terms of the GNU General Public License as published by</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment">    the Free Software Foundation; either version 2 of the License, or</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment">    (at your option) any later version.</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment">    </span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment">    This program is distributed in the hope that it will be useful,</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment">    but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment">    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment">    GNU General Public License for more details.</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment">    </span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment">    You should have received a copy of the GNU General Public License along</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment">    with this program; if not, write to the Free Software Foundation, Inc.,</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment">    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment">*/</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="preprocessor">#ifndef GameWorld_h__</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="preprocessor">#define GameWorld_h__</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="preprocessor">#include &lt;memory&gt;</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#include &lt;stack&gt;</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor">#include &quot;../base/Debuger.h&quot;</span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor">#include &quot;../utility/SmartPtrDef.h&quot;</span></div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#include &quot;../utility/Singleton.h&quot;</span></div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="keyword">namespace </span>SkyEngine2d</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;{</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;    <span class="keyword">class </span>Application;</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;    <span class="keyword">class </span>IApplicationView;</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;    <span class="keyword">class </span>Scene;</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;    <span class="keyword">class </span>IRender;</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;    <span class="keyword">class </span>DrawNode;</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;    <span class="keyword">class </span>Application;</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;    <span class="keyword">class </span>IDirectRender;</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;    <span class="keyword">class </span>Scheduler;</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;    <span class="keyword">class </span>Scene;</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;    <span class="keyword">class </span>ActionManager;</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;    <span class="keyword">class </span>TextureCache;</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;    <span class="keyword">class </span>UiCore;</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;    <span class="keyword">class </span>SpriteFrameCache;</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;    <span class="keyword">class </span>EventManager;</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;    <span class="keyword">class </span>AudioManager;</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;    </div><div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="class_sky_engine2d_1_1_game_world.html">   50</a></span>&#160;    <span class="keyword">class </span>SGE_API <a class="code" href="class_sky_engine2d_1_1_game_world.html">GameWorld</a></div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;        :<span class="keyword">public</span> <a class="code" href="class_sky_engine2d_1_1_singleton.html">Singleton</a>&lt;GameWorld,false&gt;</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;    {</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    <span class="keyword">public</span>:</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    </div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;        <span class="comment">//！引擎的运行状态</span></div><div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="class_sky_engine2d_1_1_game_world.html#a1e9f3a22d7f795d7b9e321270c355125">   56</a></span>&#160;        <span class="keyword">enum class</span> <a class="code" href="class_sky_engine2d_1_1_game_world.html#a1e9f3a22d7f795d7b9e321270c355125">EngineState</a></div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;        {</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;            running,    </div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;            pause,      </div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;            destroy     </div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;        };</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    </div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;    <span class="keyword">public</span>:</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;        ~<a class="code" href="class_sky_engine2d_1_1_game_world.html">GameWorld</a>();</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    </div><div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="class_sky_engine2d_1_1_game_world.html#a93d11e270bd7002b5b1122edeba1740d">   68</a></span>&#160;        <span class="keyword">const</span> <a class="code" href="class_sky_engine2d_1_1_game_world.html#a1e9f3a22d7f795d7b9e321270c355125">EngineState</a>&amp; <a class="code" href="class_sky_engine2d_1_1_game_world.html#a93d11e270bd7002b5b1122edeba1740d">getWorldState</a>()<span class="keyword">const </span>{ <span class="keywordflow">return</span> m_worldState; }</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;    </div><div class="line"><a name="l00071"></a><span class="lineno"><a class="line" href="class_sky_engine2d_1_1_game_world.html#a9199835960dcd8265ae6e8e9be473591">   71</a></span>&#160;        <a class="code" href="class_sky_engine2d_1_1_i_application_view.html">IApplicationView</a>* <a class="code" href="class_sky_engine2d_1_1_game_world.html#a9199835960dcd8265ae6e8e9be473591">getAppView</a>()<span class="keyword">const </span>{ <span class="keywordflow">return</span> m_appView; }</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    </div><div class="line"><a name="l00074"></a><span class="lineno"><a class="line" href="class_sky_engine2d_1_1_game_world.html#a184d97c04aac932a36035783ed7aac97">   74</a></span>&#160;        <a class="code" href="class_sky_engine2d_1_1_texture_cache.html">TextureCache</a>* <a class="code" href="class_sky_engine2d_1_1_game_world.html#a184d97c04aac932a36035783ed7aac97">getTextureCache</a>()<span class="keyword">const </span>{ <span class="keywordflow">return</span> m_textureCache; }</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;    </div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;        <a class="code" href="class_sky_engine2d_1_1_i_direct_render.html">IDirectRender</a>* getDirectInterface() <span class="keyword">const</span>;</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;    </div><div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="class_sky_engine2d_1_1_game_world.html#a110b40081121213af74f530502c86864">   80</a></span>&#160;        <a class="code" href="class_sky_engine2d_1_1_i_render.html">IRender</a>* <a class="code" href="class_sky_engine2d_1_1_game_world.html#a110b40081121213af74f530502c86864">getRenderInterface</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_renderInterface; }</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;    </div><div class="line"><a name="l00083"></a><span class="lineno"><a class="line" href="class_sky_engine2d_1_1_game_world.html#ab5018d7f5b844ed624355c74e75f2f31">   83</a></span>&#160;        <a class="code" href="class_sky_engine2d_1_1_application.html">Application</a>* <a class="code" href="class_sky_engine2d_1_1_game_world.html#ab5018d7f5b844ed624355c74e75f2f31">getApplication</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_app; }</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;    </div><div class="line"><a name="l00086"></a><span class="lineno"><a class="line" href="class_sky_engine2d_1_1_game_world.html#a2a66dea8ba9a2e1c89788651781bebf0">   86</a></span>&#160;        <a class="code" href="class_sky_engine2d_1_1_scheduler.html">Scheduler</a>* <a class="code" href="class_sky_engine2d_1_1_game_world.html#a2a66dea8ba9a2e1c89788651781bebf0">getScheduler</a>()<span class="keyword">const </span>{ <span class="keywordflow">return</span> m_Scheduler; }</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;    </div><div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="class_sky_engine2d_1_1_game_world.html#a8c2cd6a8c8d46ca61db6b87700c00b9e">   89</a></span>&#160;        <a class="code" href="class_sky_engine2d_1_1_action_manager.html">ActionManager</a>* <a class="code" href="class_sky_engine2d_1_1_game_world.html#a8c2cd6a8c8d46ca61db6b87700c00b9e">getActionManger</a>()<span class="keyword">const </span>{ <span class="keywordflow">return</span> m_actionManager; }</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;    </div><div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="class_sky_engine2d_1_1_game_world.html#ac7b7fe02280a09e9133f6fef697fd485">   92</a></span>&#160;        <a class="code" href="class_sky_engine2d_1_1_ui_core.html">UiCore</a>* <a class="code" href="class_sky_engine2d_1_1_game_world.html#ac7b7fe02280a09e9133f6fef697fd485">getUiCore</a>()<span class="keyword">const </span>{ <span class="keywordflow">return</span> m_uiCore; }</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;    </div><div class="line"><a name="l00095"></a><span class="lineno"><a class="line" href="class_sky_engine2d_1_1_game_world.html#a7e77a56bcecdfc34025d1572e9f18a59">   95</a></span>&#160;        <a class="code" href="class_sky_engine2d_1_1_audio_manager.html">AudioManager</a>* <a class="code" href="class_sky_engine2d_1_1_game_world.html#a7e77a56bcecdfc34025d1572e9f18a59">getAudioManager</a>()<span class="keyword">const </span>{ <span class="keywordflow">return</span> m_audioManager; }</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    </div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;        <a class="code" href="class_sky_engine2d_1_1_sprite_frame_cache.html">SpriteFrameCache</a>* getDefultSpriteFrameCache()<span class="keyword">const</span>;</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    </div><div class="line"><a name="l00101"></a><span class="lineno"><a class="line" href="class_sky_engine2d_1_1_game_world.html#ac847f513e6d0ed5d8c25a555f202071a">  101</a></span>&#160;        <a class="code" href="class_sky_engine2d_1_1_event_manager.html">EventManager</a>* <a class="code" href="class_sky_engine2d_1_1_game_world.html#ac847f513e6d0ed5d8c25a555f202071a">getEventManager</a>()<span class="keyword">const </span>{ <span class="keywordflow">return</span> m_eventManager; }</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;    </div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;        <span class="keywordtype">bool</span> pushScene(<span class="keyword">const</span> std::shared_ptr&lt;Scene&gt;&amp; scene);</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;        </div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;        <span class="keywordtype">void</span> popScene();</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;        </div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;        <span class="keywordtype">void</span> replaceScene(<span class="keyword">const</span> std::shared_ptr&lt;Scene&gt;&amp; scene);</div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;    </div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;</div><div class="line"><a name="l00127"></a><span class="lineno"><a class="line" href="class_sky_engine2d_1_1_game_world.html#aa1e40816549824c6450ee53d8486d4a0">  127</a></span>&#160;        <a class="code" href="class_sky_engine2d_1_1_scene.html">Scene</a>* <a class="code" href="class_sky_engine2d_1_1_game_world.html#aa1e40816549824c6450ee53d8486d4a0">getRunningScene</a>()<span class="keyword">const </span>{ <span class="keywordflow">return</span> m_runningScene; }</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;    </div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;        <span class="keywordtype">void</span> start();</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;    </div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;</div><div class="line"><a name="l00137"></a><span class="lineno"><a class="line" href="class_sky_engine2d_1_1_game_world.html#ad8b43ed5342c4d5c5ce500db3177517d">  137</a></span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_sky_engine2d_1_1_game_world.html#ad8b43ed5342c4d5c5ce500db3177517d">setTimeScale</a>(<span class="keywordtype">float</span> scale) { m_timeScale = scale; }</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;    </div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;</div><div class="line"><a name="l00143"></a><span class="lineno"><a class="line" href="class_sky_engine2d_1_1_game_world.html#a6476432b5567630479554fae78008e66">  143</a></span>&#160;        <span class="keywordtype">float</span> <a class="code" href="class_sky_engine2d_1_1_game_world.html#a6476432b5567630479554fae78008e66">getTimeScale</a>()<span class="keyword">const </span>{ <span class="keywordflow">return</span> m_timeScale; }</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;    </div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;        <span class="keywordtype">void</span>  openDebugConsole();</div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;        <span class="keywordtype">void</span>  isDisplayRenderInfo(<span class="keywordtype">bool</span> display);</div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;    <span class="keyword">protected</span>:</div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;        <a class="code" href="class_sky_engine2d_1_1_game_world.html">GameWorld</a>();</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;        <span class="keywordtype">void</span> drawScene();</div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;        <span class="comment">//Render</span></div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;        <span class="keywordtype">void</span> renderScene();</div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;        <span class="keywordtype">bool</span> init(<a class="code" href="class_sky_engine2d_1_1_i_direct_render.html">IDirectRender</a>* d3d, <a class="code" href="class_sky_engine2d_1_1_i_render.html">IRender</a>* render, <a class="code" href="class_sky_engine2d_1_1_i_application_view.html">IApplicationView</a>* app_view, <a class="code" href="class_sky_engine2d_1_1_application.html">Application</a>* app);</div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;        <span class="keywordtype">void</span> end();</div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;        <span class="comment">//主循环</span></div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;        <span class="keywordtype">void</span> mainLoop(<span class="keywordtype">double</span> dt);</div><div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;    <span class="keyword">private</span>:</div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;        <span class="keywordtype">void</span> displayRenderInfo();</div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;        <span class="keywordtype">int</span> fps(<span class="keywordtype">float</span> dt);</div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;    <span class="keyword">private</span>:</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;        <span class="comment">//当前正在运行的场景</span></div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;        <a class="code" href="class_sky_engine2d_1_1_scene.html">Scene</a>* m_runningScene;</div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;        <span class="comment">//应用程序的视图</span></div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;        <a class="code" href="class_sky_engine2d_1_1_i_application_view.html">IApplicationView</a>* m_appView;</div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;        <span class="comment">//游戏状态</span></div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;        EngineState   m_worldState;</div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;        <span class="comment">//应用程序实例</span></div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;        <a class="code" href="class_sky_engine2d_1_1_application.html">Application</a>* m_app;</div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;        <span class="comment">//d3d接口</span></div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;        <a class="code" href="class_sky_engine2d_1_1_i_direct_render.html">IDirectRender</a>* m_d3dInterface;</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;        <span class="comment">//渲染接口</span></div><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;        <a class="code" href="class_sky_engine2d_1_1_i_render.html">IRender</a>* m_renderInterface;</div><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;        <span class="comment">//调度器</span></div><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;        <a class="code" href="class_sky_engine2d_1_1_scheduler.html">Scheduler</a>* m_Scheduler;</div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;        <span class="comment">//场景栈</span></div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;        std::stack&lt;std::shared_ptr&lt;Scene&gt;&gt; m_sceneStack;</div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;        <span class="comment">//动画管理器</span></div><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;        <a class="code" href="class_sky_engine2d_1_1_action_manager.html">ActionManager</a>* m_actionManager;</div><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;        <span class="comment">//时间的缩放</span></div><div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;        <span class="keywordtype">float</span>  m_timeScale;</div><div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;        <span class="comment">//纹理缓存</span></div><div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;        <a class="code" href="class_sky_engine2d_1_1_texture_cache.html">TextureCache</a>* m_textureCache;</div><div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;        <span class="comment">//Ui核心</span></div><div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;        <a class="code" href="class_sky_engine2d_1_1_ui_core.html">UiCore</a>* m_uiCore;</div><div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;        <span class="comment">//默认精灵帧缓存</span></div><div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;        <a class="code" href="class_sky_engine2d_1_1_sprite_frame_cache.html">SpriteFrameCache</a>* m_defaultSpriteFrameCache;</div><div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;        <span class="comment">//事件管理器</span></div><div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;        <a class="code" href="class_sky_engine2d_1_1_event_manager.html">EventManager</a>* m_eventManager;</div><div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;        <span class="comment">//音频管理</span></div><div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;        <a class="code" href="class_sky_engine2d_1_1_audio_manager.html">AudioManager</a>* m_audioManager;</div><div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;        <span class="comment">//调试窗口</span></div><div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;        <span class="keywordtype">bool</span> m_isOpenDebugConsole;</div><div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;        <span class="keywordtype">bool</span> m_isDisplayRenderInfo;</div><div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;        <span class="comment">//帧率</span></div><div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;        <span class="keywordtype">int</span> m_fps;</div><div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;</div><div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;<span class="preprocessor">#ifdef _DEBUG</span></div><div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;        <span class="comment">//Debug显示</span></div><div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;        <a class="code" href="class_sky_engine2d_1_1_text.html">Text</a>* m_debugInfoFps;</div><div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;        <a class="code" href="class_sky_engine2d_1_1_text.html">Text</a>* m_debugInfoVertexCount;</div><div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;        <a class="code" href="class_sky_engine2d_1_1_text.html">Text</a>* m_debugInfoDrawCall;</div><div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;        <a class="code" href="class_sky_engine2d_1_1_text.html">Text</a>* m_debugInfoDrawCmd;</div><div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;<span class="preprocessor">#endif // _DEBUG</span></div><div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;    <span class="keyword">private</span>:</div><div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;        <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="class_sky_engine2d_1_1_application.html">Application</a>;</div><div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;    };</div><div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;}</div><div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;</div><div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;</div><div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;<span class="preprocessor">#endif // GameWorld_h__</span></div><div class="ttc" id="class_sky_engine2d_1_1_game_world_html_ac7b7fe02280a09e9133f6fef697fd485"><div class="ttname"><a href="class_sky_engine2d_1_1_game_world.html#ac7b7fe02280a09e9133f6fef697fd485">SkyEngine2d::GameWorld::getUiCore</a></div><div class="ttdeci">UiCore * getUiCore() const</div><div class="ttdoc">获取uiCore</div><div class="ttdef"><b>Definition:</b> GameWorld.h:92</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_game_world_html_a9199835960dcd8265ae6e8e9be473591"><div class="ttname"><a href="class_sky_engine2d_1_1_game_world.html#a9199835960dcd8265ae6e8e9be473591">SkyEngine2d::GameWorld::getAppView</a></div><div class="ttdeci">IApplicationView * getAppView() const</div><div class="ttdoc">获取程序视图接口</div><div class="ttdef"><b>Definition:</b> GameWorld.h:71</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_sprite_frame_cache_html"><div class="ttname"><a href="class_sky_engine2d_1_1_sprite_frame_cache.html">SkyEngine2d::SpriteFrameCache</a></div><div class="ttdoc">精灵帧缓存</div><div class="ttdef"><b>Definition:</b> SpriteFrameCache.h:38</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_game_world_html"><div class="ttname"><a href="class_sky_engine2d_1_1_game_world.html">SkyEngine2d::GameWorld</a></div><div class="ttdoc">游戏世界</div><div class="ttdef"><b>Definition:</b> GameWorld.h:50</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_game_world_html_a93d11e270bd7002b5b1122edeba1740d"><div class="ttname"><a href="class_sky_engine2d_1_1_game_world.html#a93d11e270bd7002b5b1122edeba1740d">SkyEngine2d::GameWorld::getWorldState</a></div><div class="ttdeci">const EngineState &amp; getWorldState() const</div><div class="ttdoc">获取引擎状态</div><div class="ttdef"><b>Definition:</b> GameWorld.h:68</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_singleton_html"><div class="ttname"><a href="class_sky_engine2d_1_1_singleton.html">SkyEngine2d::Singleton</a></div><div class="ttdef"><b>Definition:</b> Singleton.h:35</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_game_world_html_ab5018d7f5b844ed624355c74e75f2f31"><div class="ttname"><a href="class_sky_engine2d_1_1_game_world.html#ab5018d7f5b844ed624355c74e75f2f31">SkyEngine2d::GameWorld::getApplication</a></div><div class="ttdeci">Application * getApplication() const</div><div class="ttdoc">获取应用程序实例</div><div class="ttdef"><b>Definition:</b> GameWorld.h:83</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_game_world_html_a110b40081121213af74f530502c86864"><div class="ttname"><a href="class_sky_engine2d_1_1_game_world.html#a110b40081121213af74f530502c86864">SkyEngine2d::GameWorld::getRenderInterface</a></div><div class="ttdeci">IRender * getRenderInterface() const</div><div class="ttdoc">获取渲染接口</div><div class="ttdef"><b>Definition:</b> GameWorld.h:80</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_game_world_html_aa1e40816549824c6450ee53d8486d4a0"><div class="ttname"><a href="class_sky_engine2d_1_1_game_world.html#aa1e40816549824c6450ee53d8486d4a0">SkyEngine2d::GameWorld::getRunningScene</a></div><div class="ttdeci">Scene * getRunningScene() const</div><div class="ttdoc">获取当前正在运行的场景</div><div class="ttdef"><b>Definition:</b> GameWorld.h:127</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_i_render_html"><div class="ttname"><a href="class_sky_engine2d_1_1_i_render.html">SkyEngine2d::IRender</a></div><div class="ttdoc">渲染接口</div><div class="ttdef"><b>Definition:</b> IRender.h:13</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_game_world_html_a6476432b5567630479554fae78008e66"><div class="ttname"><a href="class_sky_engine2d_1_1_game_world.html#a6476432b5567630479554fae78008e66">SkyEngine2d::GameWorld::getTimeScale</a></div><div class="ttdeci">float getTimeScale() const</div><div class="ttdef"><b>Definition:</b> GameWorld.h:143</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_text_html"><div class="ttname"><a href="class_sky_engine2d_1_1_text.html">SkyEngine2d::Text</a></div><div class="ttdef"><b>Definition:</b> Text.h:38</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_game_world_html_a1e9f3a22d7f795d7b9e321270c355125"><div class="ttname"><a href="class_sky_engine2d_1_1_game_world.html#a1e9f3a22d7f795d7b9e321270c355125">SkyEngine2d::GameWorld::EngineState</a></div><div class="ttdeci">EngineState</div><div class="ttdef"><b>Definition:</b> GameWorld.h:56</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_action_manager_html"><div class="ttname"><a href="class_sky_engine2d_1_1_action_manager.html">SkyEngine2d::ActionManager</a></div><div class="ttdoc">动作管理器</div><div class="ttdef"><b>Definition:</b> ActionManager.h:44</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_application_html"><div class="ttname"><a href="class_sky_engine2d_1_1_application.html">SkyEngine2d::Application</a></div><div class="ttdoc">应用程序的实例</div><div class="ttdef"><b>Definition:</b> Application.h:35</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_game_world_html_a184d97c04aac932a36035783ed7aac97"><div class="ttname"><a href="class_sky_engine2d_1_1_game_world.html#a184d97c04aac932a36035783ed7aac97">SkyEngine2d::GameWorld::getTextureCache</a></div><div class="ttdeci">TextureCache * getTextureCache() const</div><div class="ttdoc">获取纹理缓存</div><div class="ttdef"><b>Definition:</b> GameWorld.h:74</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_game_world_html_a2a66dea8ba9a2e1c89788651781bebf0"><div class="ttname"><a href="class_sky_engine2d_1_1_game_world.html#a2a66dea8ba9a2e1c89788651781bebf0">SkyEngine2d::GameWorld::getScheduler</a></div><div class="ttdeci">Scheduler * getScheduler() const</div><div class="ttdoc">获取调度器</div><div class="ttdef"><b>Definition:</b> GameWorld.h:86</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_game_world_html_ac847f513e6d0ed5d8c25a555f202071a"><div class="ttname"><a href="class_sky_engine2d_1_1_game_world.html#ac847f513e6d0ed5d8c25a555f202071a">SkyEngine2d::GameWorld::getEventManager</a></div><div class="ttdeci">EventManager * getEventManager() const</div><div class="ttdoc">获取事件管理器</div><div class="ttdef"><b>Definition:</b> GameWorld.h:101</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_i_direct_render_html"><div class="ttname"><a href="class_sky_engine2d_1_1_i_direct_render.html">SkyEngine2d::IDirectRender</a></div><div class="ttdoc">Direct11 绘制相关的接口</div><div class="ttdef"><b>Definition:</b> IDirectRender.h:16</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_game_world_html_ad8b43ed5342c4d5c5ce500db3177517d"><div class="ttname"><a href="class_sky_engine2d_1_1_game_world.html#ad8b43ed5342c4d5c5ce500db3177517d">SkyEngine2d::GameWorld::setTimeScale</a></div><div class="ttdeci">void setTimeScale(float scale)</div><div class="ttdoc">设置时间缩放</div><div class="ttdef"><b>Definition:</b> GameWorld.h:137</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_i_application_view_html"><div class="ttname"><a href="class_sky_engine2d_1_1_i_application_view.html">SkyEngine2d::IApplicationView</a></div><div class="ttdoc">应用程序视图接口</div><div class="ttdef"><b>Definition:</b> IApplicationView.h:36</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_event_manager_html"><div class="ttname"><a href="class_sky_engine2d_1_1_event_manager.html">SkyEngine2d::EventManager</a></div><div class="ttdoc">标准事件管理器</div><div class="ttdef"><b>Definition:</b> EventManager.h:70</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_scene_html"><div class="ttname"><a href="class_sky_engine2d_1_1_scene.html">SkyEngine2d::Scene</a></div><div class="ttdoc">游戏场景</div><div class="ttdef"><b>Definition:</b> Scene.h:33</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_ui_core_html"><div class="ttname"><a href="class_sky_engine2d_1_1_ui_core.html">SkyEngine2d::UiCore</a></div><div class="ttdoc">UI 核心</div><div class="ttdef"><b>Definition:</b> UiCore.h:39</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_texture_cache_html"><div class="ttname"><a href="class_sky_engine2d_1_1_texture_cache.html">SkyEngine2d::TextureCache</a></div><div class="ttdoc">2D纹理缓存</div><div class="ttdef"><b>Definition:</b> TextureCache.h:34</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_audio_manager_html"><div class="ttname"><a href="class_sky_engine2d_1_1_audio_manager.html">SkyEngine2d::AudioManager</a></div><div class="ttdoc">音频管理</div><div class="ttdef"><b>Definition:</b> AudioManager.h:32</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_game_world_html_a8c2cd6a8c8d46ca61db6b87700c00b9e"><div class="ttname"><a href="class_sky_engine2d_1_1_game_world.html#a8c2cd6a8c8d46ca61db6b87700c00b9e">SkyEngine2d::GameWorld::getActionManger</a></div><div class="ttdeci">ActionManager * getActionManger() const</div><div class="ttdoc">获取动画管理器</div><div class="ttdef"><b>Definition:</b> GameWorld.h:89</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_scheduler_html"><div class="ttname"><a href="class_sky_engine2d_1_1_scheduler.html">SkyEngine2d::Scheduler</a></div><div class="ttdef"><b>Definition:</b> Scheduler.h:67</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_game_world_html_a7e77a56bcecdfc34025d1572e9f18a59"><div class="ttname"><a href="class_sky_engine2d_1_1_game_world.html#a7e77a56bcecdfc34025d1572e9f18a59">SkyEngine2d::GameWorld::getAudioManager</a></div><div class="ttdeci">AudioManager * getAudioManager() const</div><div class="ttdoc">获取音频管理器</div><div class="ttdef"><b>Definition:</b> GameWorld.h:95</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>
